package com.ywyt.elasticsearch.service;

import java.io.IOException;
import java.util.Map;

public interface DocService {
    //添加文档  indexRequest
    void addDoc(String index,String type,String json) throws IOException;

    //添加文档，并自定义id   indexRequest
    void addDoc(String index,String type,String json,String id) throws IOException;

    //修改文档  updateRequest
    void updateDoc(String index, String type,String id, Map<String,Object> doc) throws IOException;

    //删除文档  deleteRequest
    void deleteDoc(String index,String type,String id) throws IOException;

    //批量添加&修改   bulkRequest
    void bulkAddOrUpdate(String index,String type,String [] ids,String [] jsons) throws IOException;

    //批量删除
    void bulkDelete(String index,String type,String [] ids) throws IOException;
}
